import API from "@/utils/request";

export function getPageCategory({pageNum,pageSize,name}){
    return API.get('/categories/page',{
        params:{
            pageNum,
            pageSize,
            name
        }
    })
}

// export function getAllCategory(){
//     return API.get('/category')
// }



export function saveCategory(category){
    return API.post('/categories/addByFunc',category)
}

export function updateCategory(category){
    return API.post('/categories/update',category)
}
export function delBatchCategories(arr){
    return API.delete('/categories/delete', {data:arr})
}
export function removeCategory(id){
    return API.delete(`/categories/${id}`)
}